import request from '@/utils/request'

// 查询周边环境列表
export function listEnv(query) {
  return request({
    url: '/safe/env/list',
    method: 'get',
    params: query
  })
}

// 查询周边环境详细
export function getEnv(seId) {
  return request({
    url: '/safe/env/' + seId,
    method: 'get'
  })
}

// 新增周边环境
export function addEnv(data) {
  return request({
    url: '/safe/env',
    method: 'post',
    data: data
  })
}

// 修改周边环境
export function updateEnv(data) {
  return request({
    url: '/safe/env',
    method: 'put',
    data: data
  })
}

// 删除周边环境
export function delEnv(seId) {
  return request({
    url: '/safe/env/' + seId,
    method: 'delete'
  })
}

// 导出周边环境
export function exportEnv(query) {
  return request({
    url: '/safe/env/export',
    method: 'get',
    params: query
  })
}